package wc.controller.factory;

import wc.model.component.*;
import wc.model.component.roomcomponent.*;
import wc.model.grid.*;

public class ToiletRoomComponentFactory extends RoomComponentFactory{
	private static ToiletRoomComponentFactory instance = null;

	private ToiletRoomComponentFactory() {}

	public static ToiletRoomComponentFactory getInstance() {
		if(instance == null) {
			instance = new ToiletRoomComponentFactory();
		}
		return instance;
	}

	public Object clone() throws CloneNotSupportedException {
		throw new CloneNotSupportedException(); 
	}

	public Toilet createToilet() {
		TileGrid<Component> tg = new TileGrid<Component>(1,1);
		Toilet c = new Toilet(tg);
		tg.setComponent(0, 0, c);
		return c;
	}
	
	public ToiletDoor createToiletDoor() {
		TileGrid<Component> tg = new TileGrid<Component>(1,1);
		ToiletDoor c = new ToiletDoor(tg);
		tg.setComponent(0, 0, c);
		return c;
	}
}
